package a.f.l.a;

import a.c.ab;
import a.c.d;
import a.c.e;
import a.c.m;
import a.c.z;
import a.f.wc;

import java.awt.geom.Rectangle2D;
import java.util.*;

public class s
  implements lb, k, k.a_
{
  static final double a = 100.0D;
  private final ib b;
  private final List c;
  private final HashMap d;
  private final z e;
  private qb f;
  private double g;
  public static int h;
  
  public s(ib paramib)
  {
    this.b = paramib;
    this.e = new z();
    this.c = new ArrayList();
    this.d = new HashMap();
  }
  
  protected ib a()
  {
    return this.b;
  }
  
  public void a(k.a_ parama_)
  {
    this.c.add(parama_);
  }
  
  public void b(k.a_ parama_)
  {
    this.c.remove(parama_);
  }
  
  public void a(qb paramqb)
  {
    boolean bool = sb.e;
    int j = sb.d;
    this.f = paramqb;
    this.g = d();
    if (!bool) {
      if ((this.b instanceof k)) {
        ((k)this.b).a(this);
      }
    }
    do
    {
      int i = 0;
      while (j == 0)
      {
        if (i >= this.c.size()) {
          break;
        }
        if ((!bool) && (j != 0)) {
          break label128;
        }
        if (!bool)
        {
          if ((this.c.get(i) instanceof t)) {
            ((t)this.c.get(i)).a(paramqb, this);
          }
          i++;
        }
      }
    } while (bool);
    label128:
    a.d.t localt = a(paramqb.a(), this.e);
    this.b.a(this.e, localt);
  }
  
  a.d.t a(a.f.o paramo, List paramList)
  {
    boolean bool = sb.e;
    int i = sb.d;
    ab localab = new ab();
    a locala = this.f.c();
    Object localObject1 = paramo.w();
    do
    {
      if (!((m)localObject1).e()) {
        break;
      }
      localObject2 = ((m)localObject1).a();
      if (!bool)
      {
        if (!locala.a((d)localObject2, paramo)) {
          localab.add(localObject2);
        }
        ((m)localObject1).f();
      }
    } while (i == 0);
    localObject1 = wc.a(paramo, paramo.v(), localab.l());
    Object localObject2 = paramList.iterator();
    do
    {
      if (!((Iterator)localObject2).hasNext()) {
        break;
      }
      hb localhb = (hb)((Iterator)localObject2).next();
      if (i != 0) {
        break label229;
      }
      a.d.t localt = localhb.a();
      Rectangle2D.Double localDouble = new Rectangle2D.Double(localt.d(), localt.e(), localt.b(), localt.c());
      Rectangle2D.union((Rectangle2D)localObject1, localDouble, (Rectangle2D)localObject1);
    } while (i == 0);
    label229:
    return new a.d.t(((Rectangle2D)localObject1).getX() - 100.0D, ((Rectangle2D)localObject1).getY() - 100.0D, ((Rectangle2D)localObject1).getWidth() + 200.0D, ((Rectangle2D)localObject1).getHeight() + 200.0D);
  }
  
  public List c(mb parammb)
  {
    return this.b.c(parammb);
  }
  
  public List d(mb parammb)
  {
    boolean bool = sb.e;
    int i = sb.d;
    List localList = this.b.a(parammb);
    if ((bool) || (localList == null)) {
      return Collections.EMPTY_LIST;
    }
    ArrayList localArrayList = new ArrayList();
    Iterator localIterator = localList.iterator();
    do
    {
      do
      {
        hb localhb;
        do
        {
          if (!localIterator.hasNext()) {
            break;
          }
          localhb = (hb)localIterator.next();
        } while (!(localhb.b() instanceof e));
        if ((bool) || (i != 0)) {
          break label114;
        }
        localArrayList.add(localhb.b());
      } while (bool);
    } while (i == 0);
    label114:
    return localArrayList;
  }
  
  public List e(mb parammb)
  {
    return this.b.a(parammb);
  }
  
  public List a(e parame)
  {
    hb localhb = (hb)this.d.get(parame);
    if (localhb != null) {
      return this.b.a(localhb);
    }
    throw new IllegalArgumentException("Unknown node");
  }
  
  public List a(a.d.t paramt)
  {
    return this.b.a(paramt);
  }
  
  public a.d.t b()
  {
    return this.b.b();
  }
  
  public void c()
  {
    boolean bool = sb.e;
    int j = sb.d;
    int i = 0;
    if (i < this.c.size()) {}
    while (bool)
    {
      if (j != 0) {
        break label79;
      }
      if ((this.c.get(i) instanceof t)) {
        ((t)this.c.get(i)).a();
      }
      i++;
      if (j == 0) {
        break;
      }
    }
    if ((this.b instanceof k)) {
      label79:
      ((k)this.b).b(this);
    }
    this.f = null;
    this.d.clear();
    this.e.clear();
    this.b.a();
  }
  
  List a(boolean paramBoolean)
  {
    if ((sb.e) || ((this.b instanceof l))) {
      return ((l)this.b).a(false);
    }
    return Collections.EMPTY_LIST;
  }
  
  public void a(mb parammb, List paramList)
  {
    boolean bool = sb.e;
    int j = sb.d;
    do
    {
      for (int i = this.c.size() - 1; j == 0; i--)
      {
        if (i < 0) {
          break;
        }
        ((k.a_)this.c.get(i)).a(parammb, paramList);
      }
    } while (bool);
  }
  
  public void b(mb parammb)
  {
    boolean bool = sb.e;
    int j = sb.d;
    do
    {
      for (int i = this.c.size() - 1; j == 0; i--)
      {
        if (i < 0) {
          break;
        }
        ((k.a_)this.c.get(i)).b(parammb);
      }
    } while (bool);
  }
  
  public void a(mb parammb)
  {
    boolean bool = sb.e;
    int j = sb.d;
    parammb.a(new fb(parammb, this.g, this.f.c().m()));
    do
    {
      for (int i = this.c.size() - 1; j == 0; i--)
      {
        if (i < 0) {
          break;
        }
        ((k.a_)this.c.get(i)).a(parammb);
      }
    } while (bool);
  }
  
  private double d()
  {
    boolean bool = sb.e;
    int i = sb.d;
    double d1 = 0.0D;
    a locala = this.f.c();
    m localm = this.f.a().J().l();
    do
    {
      if (!localm.e()) {
        break;
      }
      d locald = localm.a();
      if (!bool)
      {
        if (i != 0) {
          break label91;
        }
        d1 = Math.max(d1, locala.a(locald).c());
        localm.f();
      }
    } while (i == 0);
    label91:
    return d1;
  }
  
  public hb a(a.d.t paramt, Object paramObject)
  {
    hb localhb = new hb(paramt, paramObject);
    this.d.put(paramObject, localhb);
    this.e.add(localhb);
    return localhb;
  }
  
  public hb a(Object paramObject)
  {
    return (hb)this.d.get(paramObject);
  }
}



/* Location:           E:\idea\

 * Qualified Name:     a.f.l.a.s

 * JD-Core Version:    0.7.0.1

 */